package com.lagou.controller;

import com.lagou.entity.COrder;
import com.lagou.service.PayService;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author jinshanzhang
 * @version 1.0
 * @description
 * @date 2021/11/1 5:15 下午
 */
@RestController
public class PayController {

    @Autowired
    private PayService payService;

    /**
     * 创建订单
     * @param cOrder
     * @return
     */
    @PostMapping("/create/order")
    public String createOrder(@RequestBody COrder cOrder){
        return payService.createOrder(cOrder);
    }
}
